<template>
	<view class="user-info">
	  <image src="/static/images/人物.png" alt="用户头像" class="avatar">
	  <view class="user-meta">
	    <text class="username">{{obj.username || ''}}</text>
	    <text class="post-time">{{obj.time || ''}}</text>
	  </view>
	  <!-- <button class="follow-btn">+ 关注</button> -->
	</view>
</template>

<script>
	import colortool from "@/untils/colorTool.js"
	export default{
		name:"detailuserInfo",
		props:{
			obj:{
				default:()=>{}
			}
		},
		data(){
			return{
				bgcolor:colortool.randomColor()
			}
		},
		methods:{
			log(){
				console.log("------------------27");
				console.log(this.$props.obj);
			}
		}
	}
</script>

<style scoped>
	.user-info {
	  display: flex;
	  align-items: center;
	  padding: 15px;
	  position: relative;
	  border-bottom: 1px solid #f0f0f0;
	}
	
	.avatar {
	  width: 48px;
	  height: 48px;
	  border-radius: 50%;
	  margin-right: 12px;
	}
	
	.user-meta {
	  flex: 1;
	}
	
	.username {
	  font-size: 17px;
	  font-weight: 500;
	  display: block;
	  margin-bottom: 4px;
	}
	
	.post-time {
	  font-size: 13px;
	  color: #999;
	}
	
	.follow-btn {
		display: flex;
		justify-content: center;
		align-items: center;
		height: 30px;
	  background-color: #07C160;
	  color: white;
	  border: none;
	  border-radius: 18px;
	  padding: 8px 16px;
	  font-size: 14px;
	  margin-left: 10px;
	  font-weight: 500;
	}
</style>